<script setup lang="ts">
import {ref, watch} from "vue";
import {useSysStore} from "stores/sysStore";
import {Wss} from "src/utils/type";

let sysStores = useSysStore()
let showDia = ref(false)
let userId = ref(localStorage.getItem("userId"));
let token = ref(localStorage.getItem("token"));


const openDialog = () => {
  showDia.value = true;
}
defineExpose({
  openDialog
})
</script>

<template>
  <q-dialog v-model="showDia" position="left">
    <q-card>
      <q-card-section class="row items-center q-pb-none">
        <div class="text-h6">简一</div>
          <q-space />
        <q-btn icon="close" flat round dense v-close-popup />
      </q-card-section>

      <q-card-section>
        <div class="agent-com">
          <iframe class="agent" :src="`https://www.flopsai.cn:8093?source=video&userId=${userId}&token=${token}`"></iframe>
        </div>
      </q-card-section>
    </q-card>
  </q-dialog>
</template>

<style scoped lang="scss">
.agent-com{
  width: 420px;
  background-color: white;
  height: 90vh;
  .agent{
    border: 0;
    width: 100%;
    height: 100%;
  }
}
</style>
